package ${bean.packageName};

import com.fasterxml.jackson.annotation.*;
import com.solution.framework.model.BaseBean;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
* Created with generator tools.
* User: ${bean.createUser}
* DateTime:${bean.createTime}
*/
@Entity
@Table(name = "${bean.tableName}")
public class ${bean.className} extends ${bean.baseClassName} implements java.io.Serializable {
<#list bean['fields'] as field>

/**
* ${field.comment}
*/
private ${field.type} ${field.name};
</#list>

/** default constructor */
public ${bean.className}() {
}

/**
* full constructor
<#list bean['fields'] as field>
* @param ${field.name}
</#list>
*/
public ${bean.className}(<#list bean['fields'] as field>${field.type} ${field.name}<#if field_has_next>,</#if></#list>) {
<#list bean['fields'] as field>
this.${field.name}=${field.name};
</#list>
}

<#list bean['fields'] as field>
/**
*  getter
*/
    <#list field['jpaAnnotations'] as annotation>
    ${annotation}
    </#list>
public ${field.type} get${field.upperName}() {
return this.${field.name};
}

/**
* setter
* @param ${field.name}
*/
public void set${field.upperName}(${field.type} ${field.name}) {
this.${field.name} = ${field.name};
}

</#list>
}
